#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <string>

using namespace std;
// 测试
double WeightedValue(const pair<string, double> &a,
                     const pair<string, double> &b) {
  return a.second * b.second;
}

int main() {
  map<string, double> dowPrice{{"mmm", 81.86}, {"aa", 34.69}, {"mo", 54.45}};
  map<string, double> dowWeight{
      {"mmm", 5.8549}, {"aa", 2.4808}, {"mo", 3.8940}};
  map<string, double> dowName{{"mmm", 81.86}, {"aa", 34.69}, {"mo", 54.45}};

  double value =
      inner_product(dowPrice.begin(), dowPrice.end(), dowWeight.begin(), 0.0,
                    plus<double>(), WeightedValue);
  cout << value << "\n";

  cout << sizeof(bool) << endl;

  return 0;
}